"use strict";
cc._RF.push(module, 'dff30nDJ39DoJMzv4+wkVPF', '_UserSubtractHpResultHandler');
// CustomResultHandler/_UserSubtractHpResultHandler.js

"use strict";

// @import
var mod_Global = require("../_Global");

var CHeroAction = require("../CHeroAction"); // @export


module.exports = {
  /** @override */
  handle: function handle(oUserSubtractHpResult) {
    if (!oUserSubtractHpResult) {
      return;
    } // 获取目标用户 Id


    var nTargetUserId = oUserSubtractHpResult.targetUserId;
    var strTargetUserId = nTargetUserId.toString(); // 获取减血量

    var nSubtractHp = Math.abs(oUserSubtractHpResult.subtractHp); // 从字典中获取英雄

    var oExistHero = mod_Global.heroMap[strTargetUserId];

    if (!oExistHero) {
      return;
    } // 令英雄减血


    oExistHero.getComponent(CHeroAction).subtractHp(nSubtractHp);
  }
};

cc._RF.pop();